import { Component, Input, OnInit, Output, EventEmitter, ViewChild } from '@angular/core';
import { BannerService } from './../vsp/bean/banner.service';

@Component({
  selector: 'banner',
  styleUrls: ['./banner.component.css'],
  templateUrl: './banner.component.html',
  providers: [
    BannerService
  ]
})
export class BannerComponent implements OnInit {
  isShow: boolean = true;
  public data: Array<any> = [];



  constructor(
    public bannerService: BannerService,
  ) { }

  ngOnInit() {
    this.isShow =true;
    this.bannerService.getBanner().then(res => {
      this.data = res.json().bannerInfo;
      this.isShow = false ;
    })
  }
}
